@include('lay.nav')
<div class="usertop">
    <div class="header">
        <div class="width">
            @include('lay.top')
        </div>
    </div>

    <div class="user-profile">
        <div class="count width">
            <div><p>在线商品</p>
                <p>{{$statistics['all_online_number']}}</p></div>
            <div><p>入驻时长</p>
                <p>{{$statistics['user_time']}}天</p></div>
            <div class="figure"><p><img src="{{user_image_url($user->avatar)}}" alt="用户头像"></p></div>
            <div><p>平台排名</p>
                <p>{{$statistics['ranking']}}</p></div>
            <div><p>信用积分</p>
                <p>{{$user->integral}}</p></div>
        </div>
        <div class="user width">
            <div class="nickname">{{$user->username}}</div>
            <div class="address">{{$user->province}}|{{$user->city}}</div>
            <div class="text">@if($user->signature) {{$user->signature}}  @else 这个人很个性，没有个性签名~   @endif</div>
            <div class="btn">
                @if($auth)
                    <span id="userAuth">已认证</span>
                @else
                    <span id="userAuth">未认证</span>
                @endif
                &nbsp; &nbsp;
                <span id="userContact">联系Ta</span>
                <div class="userauthinfo" id="authBox">
                    <p> 真实姓名 <b @if($auth)  class="active" @endif><i class="iconfont icon-31xuanze"></i></b></p>
                    <p>身 份 证 <b @if($auth)  class="active" @endif><i class="iconfont icon-31xuanze"></i></b></p>
                    <p>收入证明 <b @if($auth)  class="active" @endif><i class="iconfont icon-31xuanze"></i></b></p>
                    <p>渠道信息 <b @if($auth)  class="active" @endif><i class="iconfont icon-31xuanze"></i></b></p>
                </div>
                <div class="userauthinfo" id="contactBox">
                    <p>QQ：{{$user->qq}}</p>
                </div>
            </div>
            <div class="order">
                <select onchange="orderby(this)">
                    <option value="1" @if($search['oid']==1) selected="selected"   @endif>时间最新</option>
                    <option value="2" @if($search['oid']==2) selected="selected"   @endif>增长最多</option>
                    <option value="3" @if($search['oid']==3) selected="selected"   @endif>代金券价格</option>
                    <option value="4" @if($search['oid']==4) selected="selected"   @endif>佣金最多</option>
                </select>
            </div>
        </div>
    </div>
</div>

<div class="products">
    <div class="width">
        @include('lay.oneGoods')
    </div>
    <div style="clear:both;"></div>
</div>


<div class="pages width">
    <ul class="pagination">
        {{ $list->appends($search)->links() }}
    </ul>
</div>
@include('lay.footer')
<script type="text/javascript">
    $('#userAuth').mousemove(function () {
        $('#authBox').fadeIn();
    })
    $('#userAuth').mouseout(function () {
        $('#authBox').fadeOut();
    })
    $('#userContact').mousemove(function () {
        $('#contactBox').fadeIn();
    })
    $('#userContact').mouseout(function () {
        $('#contactBox').fadeOut();
    })
    function orderby(obj) {
        window.location.href = "{{route('userhome')}}" + '?oid=' + obj.value + '&userid=' + "{{$search['userid']}}";
    }
</script>
